<?php
	require('privilege.doc.php');
	//特权列表
	$app->get(
		'/privilege/list',
		function() use($app, $db2){
			$data = $app->request()->get();
			$echo['error'] = "";
			$echo['data'] = array();
			$privilege = $db2->select(0, 'tb_privilege', '*');
			if($privilege){
				foreach($privilege as $v){
					$tmp['privilegeid'] = $v['tbid'];
					$tmp['lasting'] = $v['lasting'];
					$tmp['price'] = $v['price'];
					$tmp['title'] = $v['title'];
					$echo['data'][] = $tmp;
				}
			}
			echo json_encode($echo);
		}
	);
?>
